home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.3#0"; "COMCTL32.OCX"
- Begin VB.Form frmOptions
- BorderStyle = 3 'Fixed Dialog
- Caption = "Options"
- ClientHeight = 3525
- ClientLeft = 45
- ClientTop = 330
- ClientWidth = 5970
- BeginProperty Font
- Name = "Tahoma"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Icon = "frmOptions.frx":0000
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 3525
- ScaleWidth = 5970
- ShowInTaskbar = 0 'False
- StartUpPosition = 3 'Windows Default
- Begin VB.PictureBox picTabContainer
- Height = 2535
- Index = 5
- Left = 2040
- ScaleHeight = 2475
- ScaleWidth = 3795
- TabIndex = 30
- Top = 4920
- Width = 3855
- Begin VB.Frame fraHTML
- Caption = "HTML Options"
- Height = 2295
- Left = 120
- TabIndex = 31
- Top = 120
- Width = 3495
- Begin VB.TextBox txtFooter
- Height = 735
- Left = 1320
- MultiLine = -1 'True
- ScrollBars = 3 'Both
- TabIndex = 35
- Text = "frmOptions.frx":27A2
- Top = 1440
- Width = 2175
- End
- Begin VB.TextBox txtHeader
- Height = 855
- Left = 1320
- MultiLine = -1 'True
- ScrollBars = 3 'Both
- TabIndex = 33
- Text = "frmOptions.frx":27B5
- Top = 360
- Width = 2175
- End
- Begin VB.Label lblFooter
- AutoSize = -1 'True
- Caption = "Page Footer:"
- Height = 195
- Left = 120
- TabIndex = 34
- Top = 1560
- Width = 945
- End
- Begin VB.Label lblHeader
- AutoSize = -1 'True
- Caption = "Page Header:"
- Height = 195
- Left = 120
- TabIndex = 32
- Top = 360
- Width = 990
- End
- End
- End
- Begin VB.CommandButton cmdCancel
- Caption = "&Cancel"
- Height = 375
- Left = 4800
- TabIndex = 29
- Top = 2880
- Width = 1095
- End
- Begin VB.CommandButton cmdOK
- Caption = "&OK"
- Default = -1 'True
- Height = 375
- Left = 3600
- TabIndex = 28
- Top = 2880
- Width = 1095
- End
- Begin VB.PictureBox picTabContainer
- Height = 2055
- Index = 4
- Left = 1800
- ScaleHeight = 1995
- ScaleWidth = 3915
- TabIndex = 18
- Top = 4680
- Width = 3975
- Begin VB.Frame fraHeader
- Caption = "Header Options"
- Height = 1815
- Left = 120
- TabIndex = 19
- Top = 120
- Width = 3735
- Begin VB.TextBox txtCompany
- Height = 285
- Left = 1080
- TabIndex = 27
- Top = 1440
- Width = 2415
- End
- Begin VB.TextBox txtWeb
- Height = 285
- Left = 1080
- TabIndex = 25
- Top = 1080
- Width = 2415
- End
- Begin VB.TextBox txtEmail
- Height = 285
- Left = 1080
- TabIndex = 23
- Top = 720
- Width = 2415
- End
- Begin VB.TextBox txtName
- Height = 285
- Left = 1080
- TabIndex = 21
- Top = 360
- Width = 2415
- End
- Begin VB.Label lblCompany
- AutoSize = -1 'True
- Caption = "Company:"
- Height = 195
- Left = 120
- TabIndex = 26
- Top = 1440
- Width = 735
- End
- Begin VB.Label lblWeb
- AutoSize = -1 'True
- Caption = "Web Site:"
- Height = 195
- Left = 120
- TabIndex = 24
- Top = 1080
- Width = 705
- End
- Begin VB.Label lblEmail
- AutoSize = -1 'True
- Caption = "Email:"
- Height = 195
- Left = 120
- TabIndex = 22
- Top = 720
- Width = 420
- End
- Begin VB.Label lblName
- AutoSize = -1 'True
- Caption = "Name:"
- Height = 195
- Left = 120
- TabIndex = 20
- Top = 360
- Width = 465
- End
- End
- End
- Begin VB.PictureBox picTabContainer
- Height = 1575
- Index = 3
- Left = 1320
- ScaleHeight = 1515
- ScaleWidth = 3555
- TabIndex = 14
- Top = 4320
- Width = 3615
- Begin VB.Frame fraInterface
- Caption = "Interface Options"
- Height = 1215
- Left = 120
- TabIndex = 15
- Top = 120
- Width = 2895
- Begin VB.CheckBox chkTabs
- Caption = "Remember selected tabs"
- Height = 255
- Left = 120
- TabIndex = 17
- Top = 720
- Width = 2175
- End
- Begin VB.CheckBox chkSizes
- Caption = "Save positions on exit"
- Height = 255
- Left = 120
- TabIndex = 16
- Top = 360
- Width = 2535
- End
- End
- End
- Begin VB.PictureBox picTabContainer
- Height = 1695
- Index = 2
- Left = 720
- ScaleHeight = 1635
- ScaleWidth = 3555
- TabIndex = 6
- Top = 3840
- Width = 3615
- Begin VB.Frame fraColours
- Caption = "&Colourizing Options"
- Height = 1455
- Left = 120
- TabIndex = 7
- Top = 120
- Width = 4335
- Begin VB.PictureBox picText
- BackColor = &H00000000&
- Height = 495
- Left = 2760
- ScaleHeight = 435
- ScaleWidth = 1275
- TabIndex = 13
- Top = 720
- Width = 1335
- End
- Begin VB.PictureBox picKeyword
- BackColor = &H00C00000&
- Height = 495
- Left = 1440
- ScaleHeight = 435
- ScaleWidth = 1155
- TabIndex = 11
- Top = 720
- Width = 1215
- End
- Begin VB.PictureBox picComment
- BackColor = &H00008000&
- Height = 495
- Left = 120
- ScaleHeight = 435
- ScaleWidth = 1155
- TabIndex = 9
- Top = 720
- Width = 1215
- End
- Begin VB.Label lblText
- AutoSize = -1 'True
- Caption = "Text Colour"
- Height = 195
- Left = 2760
- TabIndex = 12
- Top = 360
- Width = 840
- End
- Begin VB.Label lblKeyword
- AutoSize = -1 'True
- Caption = "Keyword Colour"
- Height = 195
- Left = 1440
- TabIndex = 10
- Top = 360
- Width = 1140
- End
- Begin VB.Label lblComment
- AutoSize = -1 'True
- Caption = "Comment Colour"
- Height = 195
- Left = 120
- TabIndex = 8
- Top = 360
- Width = 1185
- End
- End
- End
- Begin VB.PictureBox picTabContainer
- Height = 1695
- Index = 1
- Left = 360
- ScaleHeight = 1635
- ScaleWidth = 2955
- TabIndex = 1
- Top = 3600
- Width = 3015
- Begin VB.Frame fraDatabase
- Caption = "&Database Options (At end of session)"
- Height = 1575
- Left = 120
- TabIndex = 2
- Top = 120
- Width = 2895
- Begin VB.CheckBox chkRepair
- Caption = "Repair DB"
- Height = 255
- Left = 120
- TabIndex = 5
- Top = 1080
- Width = 1695
- End
- Begin VB.CheckBox chkCompact
- Caption = "Compact DB"
- Height = 255
- Left = 120
- TabIndex = 4
- Top = 720
- Width = 2415
- End
- Begin VB.CheckBox chkBackup
- Caption = "Backup DB"
- Height = 255
- Left = 120
- TabIndex = 3
- Top = 360
- Width = 2415
- End
- End
- End
- Begin ComctlLib.TabStrip tbsTab
- Height = 2655
- Left = 0
- TabIndex = 0
- Top = 120
- Width = 5895
- _ExtentX = 10398
- _ExtentY = 4683
- ImageList = "ImageList1"
- _Version = 327682
- BeginProperty Tabs {0713E432-850A-101B-AFC0-4210102A8DA7}
- NumTabs = 5
- BeginProperty Tab1 {0713F341-850A-101B-AFC0-4210102A8DA7}
- Caption = "Database"
- Key = ""
- Object.Tag = ""
- Object.ToolTipText = "Database"
- ImageVarType = 8
- ImageKey = "DB"
- EndProperty
- BeginProperty Tab2 {0713F341-850A-101B-AFC0-4210102A8DA7}
- Caption = "Colourizing"
- Key = ""
- Object.Tag = ""
- Object.ToolTipText = "Colourizing"
- ImageVarType = 8
- ImageKey = "COLOUR"
- EndProperty
- BeginProperty Tab3 {0713F341-850A-101B-AFC0-4210102A8DA7}
- Caption = "Interface"
- Key = ""
- Object.Tag = ""
- Object.ToolTipText = "Interface"
- ImageVarType = 8
- ImageKey = "UI"
- EndProperty
- BeginProperty Tab4 {0713F341-850A-101B-AFC0-4210102A8DA7}
- Caption = "Header"
- Key = ""
- Object.Tag = ""
- Object.ToolTipText = "Header"
- ImageVarType = 8
- ImageKey = "HEADER"
- EndProperty
- BeginProperty Tab5 {0713F341-850A-101B-AFC0-4210102A8DA7}
- Caption = "HTML"
- Key = ""
- Object.Tag = ""
- Object.ToolTipText = "HTML"
- ImageVarType = 8
- ImageKey = "HTML"
- EndProperty
- EndProperty
- End
- Begin ComctlLib.ImageList ImageList1
- Left = 1800
- Top = 2880
- _ExtentX = 1005
- _ExtentY = 1005
- BackColor = -2147483637
- ImageWidth = 16
- ImageHeight = 16
- MaskColor = 12632256
- _Version = 327682
- BeginProperty Images {0713E8C2-850A-101B-AFC0-4210102A8DA7}
- NumListImages = 5
- BeginProperty ListImage1 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
- Picture = "frmOptions.frx":27E8
- Key = "COLOUR"
- EndProperty
- BeginProperty ListImage2 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
- Picture = "frmOptions.frx":2944
- Key = "DB"
- EndProperty
- BeginProperty ListImage3 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
- Picture = "frmOptions.frx":2AA0
- Key = "HEADER"
- EndProperty
- BeginProperty ListImage4 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
- Picture = "frmOptions.frx":2BFC
- Key = "HTML"
- EndProperty
- BeginProperty ListImage5 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
- Picture = "frmOptions.frx":2D58
- Key = "UI"
- EndProperty
- EndProperty
- End
- Attribute VB_Name = "frmOptions"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- '----------------------------------------
- '- Name: Sam Huggill
- '- Email: sam@vbsquare.com
- '- Web: http://www.vbsquare.com/
- '- Company: Lighthouse Internet Solutions
- '- Date/Time: 14/08/99 11:33:18
- '----------------------------------------
- '- Notes: Handles program options
- '----------------------------------------
- Option Explicit
- Private Const NumberOfTabs = 5
- Private Sub cmdCancel_Click()
- Unload Me
- End Sub
- Private Sub cmdOK_Click()
- '// Save settings to the registry
- SaveSetting ThisApp, "Database", "Backup", chkBackup.Value
- SaveSetting ThisApp, "Database", "Compact", chkCompact.Value
- SaveSetting ThisApp, "Database", "Repair", chkRepair.Value
- SaveSetting ThisApp, "General", "Sizes", chkSizes.Value
- SaveSetting ThisApp, "General", "Remember Tabs", chkTabs.Value
- SaveSetting ThisApp, "General", "Name", txtName
- SaveSetting ThisApp, "General", "Email", txtEmail
- SaveSetting ThisApp, "General", "Web", txtWeb
- SaveSetting ThisApp, "General", "Company", txtCompany
- SaveSetting ThisApp, "HTML", "Header", txtHeader.Text
- SaveSetting ThisApp, "HTML", "Footer", txtFooter.Text
- Unload Me
- End Sub
- Private Sub Form_Load()
- Dim intTabIndex As Integer
- Dim blnTab As Boolean
- Dim intIndex As Integer
- Dim intX As Integer
- Dim blnBackup As Boolean
- Dim blnRepair As Boolean
- Dim blnCompact As Boolean
- Dim intSizes As Integer
- '// Get settings from the registry
- '// and set-up the tabs
- For intX = 1 To NumberOfTabs
- With picTabContainer(intX)
- .BorderStyle = 0
- .left = tbsTab.ClientLeft
- .tOp = tbsTab.ClientTop
- .Width = tbsTab.ClientWidth
- .Height = tbsTab.ClientHeight
- .Visible = False
- End With
- Next intX
- blnTab = GetSetting(ThisApp, "General", "Remember Tabs", True)
- If blnTab = True Then
- intTabIndex = Val(GetSetting(ThisApp, "General", "Options", 1))
- '// Thanks to Randy Ledyard
- If intTabIndex = 0 Then intTabIndex = 1
- tbsTab.Tabs(intTabIndex).Selected = True
- End If
- fraColours.Move ScaleLeft + 15, ScaleTop + 15, picTabContainer(1).Width - 15, picTabContainer(1).Height - 15
- fraDatabase.Move ScaleLeft + 15, ScaleTop + 15, picTabContainer(1).Width - 15, picTabContainer(1).Height - 15
- fraHeader.Move ScaleLeft + 15, ScaleTop + 15, picTabContainer(1).Width - 15, picTabContainer(1).Height - 15
- fraInterface.Move ScaleLeft + 15, ScaleTop + 15, picTabContainer(1).Width - 15, picTabContainer(1).Height - 15
- fraHTML.Move ScaleLeft + 15, ScaleTop + 15, picTabContainer(1).Width - 15, picTabContainer(1).Height - 15
- blnBackup = GetSetting(ThisApp, "Database", "Backup", False)
- blnRepair = GetSetting(ThisApp, "Database", "Repair", False)
- blnCompact = GetSetting(ThisApp, "Database", "Compact", False)
- intSizes = GetSetting(ThisApp, "General", "Sizes", 1)
- txtName = GetSetting(ThisApp, "General", "Name", "")
- txtEmail = GetSetting(ThisApp, "General", "Email", "")
- txtWeb = GetSetting(ThisApp, "General", "Web", "")
- txtCompany = GetSetting(ThisApp, "General", "Company", "")
- If blnBackup Then
- chkBackup.Value = 1
- Else
- chkBackup.Value = 0
- End If
- If blnRepair Then
- chkRepair.Value = 1
- Else
- chkRepair.Value = 0
- End If
- If blnCompact Then
- chkCompact.Value = 1
- Else
- chkCompact.Value = 0
- End If
- chkSizes.Value = intSizes
- If blnTab Then
- chkTabs.Value = 1
- Else
- chkTabs.Value = 0
- End If
- picComment.BackColor = Val(GetSetting(ThisApp, "Colour", "Comment", RGB(0, 127, 0)))
- picKeyword.BackColor = Val(GetSetting(ThisApp, "Colour", "Keyword", RGB(0, 0, 127)))
- picText.BackColor = Val(GetSetting(ThisApp, "Colour", "Text", RGB(0, 0, 0)))
- CentreForm Me
- fraColours.Move ScaleLeft + 15, ScaleTop + 15, ScaleWidth - 15, ScaleHeight - 15
- fraDatabase.Move ScaleLeft + 15, ScaleTop + 15, ScaleWidth - 15, ScaleHeight - 15
- fraHeader.Move ScaleLeft + 15, ScaleTop + 15, ScaleWidth - 15, ScaleHeight - 15
- fraInterface.Move ScaleLeft + 15, ScaleTop + 15, ScaleWidth - 15, ScaleHeight - 15
- fraHTML.Move ScaleLeft + 15, ScaleTop + 15, ScaleWidth - 15, ScaleHeight - 15
- txtHeader.Width = fraHTML.Width - (txtHeader.left * 1.5)
- txtFooter.Width = fraHTML.Width - (txtFooter.left * 1.5)
- txtHeader = GetSetting(ThisApp, "HTML", "Header", txtHeader.Text)
- txtFooter = GetSetting(ThisApp, "HTML", "Footer", txtFooter.Text)
- End Sub
- Private Sub Form_Unload(Cancel As Integer)
- Dim intTabIndex As Integer
- Dim blnTab As Boolean
- '// Save the current tab
- blnTab = GetSetting(ThisApp, "General", "Remember Tabs", True)
- If blnTab = True Then
- SaveSetting ThisApp, "General", "Options", tbsTab.SelectedItem.Index
- End If
- End Sub
- Private Sub picComment_Click()
- Dim lngColour As Long
- lngColour = ChooseColour(Me.hwnd)
- If lngColour <> -1 Then
- picComment.BackColor = lngColour
- frmMain.ctlData1.Comment lngColour
- End If
- End Sub
- Private Sub picKeyword_Click()
- Dim lngColour As Long
- lngColour = ChooseColour(Me.hwnd)
- If lngColour <> -1 Then
- picKeyword.BackColor = lngColour
- frmMain.ctlData1.Keyword lngColour
- End If
- End Sub
- Private Sub picText_Click()
- Dim lngColour As Long
- lngColour = ChooseColour(Me.hwnd)
- If lngColour <> -1 Then
- picText.BackColor = lngColour
- frmMain.ctlData1.TextC lngColour
- End If
- End Sub
- Private Sub tbsTab_Click()
- Static PrevTab As Integer
- PrevTab = Switch(PrevTab = 0, 1, PrevTab >= 1 And PrevTab <= NumberOfTabs, PrevTab)
- picTabContainer(PrevTab).Visible = False
- picTabContainer(tbsTab.SelectedItem.Index).Visible = True
- picTabContainer(tbsTab.SelectedItem.Index).Refresh
- PrevTab = tbsTab.SelectedItem.Index
- DoEvents
- End Sub
-